package com.qlslylq.ad.sdk.enums;

/**
 * 系统类型<br/>
 */
public enum OsType {

    Android(1, "Android"),
    IOS(2, "IOS"),
    H5(3, "H5");

    private int id;

    private String name;

    OsType(int id, String name) {
        this.id = id;
        this.name = name;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public static OsType getEnumById(int id) {
        for (OsType item : OsType.values()) {
            if (item.getId() == id) {
                return item;
            }
        }
        return null;
    }
}
